package com.taxi.comm.business.service;

import com.taxi.comm.business.service.M002.M002Response;
import com.taxi.comm.message.Response;


/**
 * Each Request will be processed by the subclass of this service.
 * Subclasses of this class is singleton which managed by spring.
 * Note that this class is not thread-safe.
 * 
 * @author Watertao
 *
 */
public abstract class AbstractPMService<Q extends String> {

	/**
	 * Check the definition of the message. 
	 * This method will be invoked before {handleContentRequest}
	 * 
	 * @param request
	 * @throws RequestHandleException when the message is not well defined
	 */

	
	/**
	 * Handle the request
	 * 
	 * @param request
	 * @return
	 */
	public abstract Response handleContentRequest(Q request) 
		throws Exception;
	
}
